# import sys
# print('================Python import mode==========================');
# print ('命令行参数为:')
# # for i in sys.argv:
# #     print (i)
# print(sys.argv[0])
# # print(sys.argv[1])
# # print(sys.argv[2])
# # print ('\n python 路径为',sys.path)
#
# a = 'dd'
# print(isinstance(a,str))


# a = 10
# b = 20
# print(a and b) # 20
# print(a or b)  # 10
# print('*'*6)
# a = 0
# b = 20
# print(a and b) # False 0
# print(a or b)  # 20

# 简单的斐波那契
# a, b = 0, 1
# while b < 50:
#     print(b, end='  ') # end不换行
#     a, b = b, a+b


#########
# 传入不可变类型
def ChangeInt(a):
    a = 10
    print(a)

b = 2
ChangeInt(b)
print(b)  # 结果是 2


# 传入可变类型
def changeme(mylist):
    "修改传入的列表"
    mylist.append([1, 2, 3, 4])
    print("函数内取值: ", mylist)


mylist = [10, 20, 30]
print('mylist',mylist)
changeme(mylist)
print("函数外取值: ", mylist)